package org.spring.springboot.app.ztest.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.spring.springboot.util.http.HttpAPIService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;

/**
 * Created by lxg
 * on 2017/2/6.
 */
@ApiIgnore
@Api(description = "测试http请求")
@RequestMapping("/httpclient")
@RestController
public class HttpTestController {

    @Autowired
    private HttpAPIService httpAPIService;

    @ApiOperation(value="请求")
    @RequestMapping(value = "", method = RequestMethod.GET)
    public String test() throws Exception {
        String str = httpAPIService.doGet("http://115.28.11.75:9091/app/sysDict");
        System.out.println(str);
        return "hello";
    }
}
